<?php


namespace app\model;


class Discuss extends BaseModel
{
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'author_id')
            ->field(['id', 'name', 'img_id']);
    }

    public function discuss()
    {
        return $this->hasMany(DiscussComment::class, 'discuss_id', 'id');
    }
}